package com.attendcollatesys.mapper;

import com.attendcollatesys.entity.ATLeaveExtraDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;


@Mapper
public interface ATLeaveExtraDetailMapper {
    int insertBatch(List<ATLeaveExtraDetail> list);

    int deleteByRequestNo(List<String> list);

    ATLeaveExtraDetail queryByDateAndRtx(@Param("date") Date date, @Param("RtxNo") String RtxNo);

    //按照时间区间进行数据查询

    /**
     *
     * @param params
     * "startDate","endDate","name","rtxNumber"
     * @return
     */
    List<ATLeaveExtraDetail> queryBetwStartEndNameRtx(@Param("params")Map params);

    /**
     *
     * @param rtxNumber 唯一标识
     * @param date 当前日期
     * @return 一条详细信息
     */
    ATLeaveExtraDetail selectByStartEndRtx(@Param("rtxNumber") String rtxNumber,@Param("date") Date date);

    /**
     *
     * @param params
     *  "startDate","endDate","name","tayps","rtxNumber",
     * @return List<ATLeaveExtraDetail>
     */
    List<ATLeaveExtraDetail> selectAllByTaypsEx(@Param("params") Map params);

}
